package com.ccys.db.dto.app.getStarted;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author：XLY
 * @Date：2024/1/22 0022
 */

@Data
public class PrepareForBookingDto {


    // public class PrepareBooking
    //    {
    //        public string child_id { get; set; }
    //        public string booking_id { get; set; }//应该不会传
    //        public string booking_code { get; set; }//应该不会传
    //        public bool G6PD { get; set; }
    //        public bool pregnant { get; set; }
    //        public List<string> symptoms { get; set; }
    //        public List<dynamic> symptom_photos { get; set; }
    //        public List<dynamic> medications { get; set; }
    //        public List<dynamic> allergies { get; set; }
    //        public List<dynamic> reactions { get; set; }
    //        public string deeplink_id { get; set; }
    //        public List<dynamic> specialist_referral_letter_photos { get; set; }
    //        public int? consult_type { get; set; }
    //        public EmergencyContact emergency_contact { get; set; }
    //        public LocationDetectionModel consulting_from_address { get; set; } = new LocationDetectionModel();
    //        public string mem_delivery_address_id { get; set; }
    //        public int service_type { get; set; }
    //        public string deeplink_identifier_for_tracking { get; set; }
    //    }



    private String child_id;

    private String booking_id;

    private String booking_code;

    private boolean G6PD;

    private boolean pregnant;

    private List<String> symptoms;


    // photo.name = row["image_name"].ToString();
    // photo.url = pub_Function.getImageUrlAPI(account_id, "", Constants.API_ROLE_NAME.MEMBER, row["booking_image_id"].ToString(), Constants.API_Image_Type.BOOKING_SYMPTOM, "");


    private List<SymptomPhotoVo> symptom_photos;

    // medication.MDMedication_ID = row["MDMedication_ID"].ToString();
    // medication.MDMedicationUsagePeriod_ID = row["MDMedicationUsagePeriod_ID"].ToString();
    // medication.MDMedication_ID = row["amount_of_dosage"].ToString();

    private List<MedicationVo> medications;


    //        "allergies": [
    //            {
    //                "MDAllergies_ID": "3bb42c21-dabb-4826-818d-0004b9772388",
    //                "mem_allergies_index": "1"
    //            }
    //        ],
    //        "reactions": [
    //            {
    //                "MD_MedicationReaction_ID": "f97ad603-b0ae-44e9-843f-979e4b335a5b",
    //                "mem_medication_reaction_index": "1"
    //            }
    //        ],

    private List<AllergyVo> allergies;

    private List<ReactionVo> reactions;

    public String deeplink_id;
    public List<String> specialist_referral_letter_photos;
    public Integer consult_type;

    // EmergencyContact emergency_contact = new EmergencyContact()
    //  {
    //      first_name = r["first_name"].ToString(),
    //      last_name = r["last_name"].ToString(),
    //      phone = r["phone"].ToString(),
    //      relationship = r["relationship"].ToString()
    //   };
    public EmergencyContact emergency_contact;

    public LocationDetectionModel consulting_from_address;

    public String mem_delivery_address_id;
    public Integer service_type;
    public String deeplink_identifier_for_tracking;


    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_address", SqlDbType.NVarChar, 250, model.consulting_from_address.location_address));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_country", SqlDbType.NVarChar, 100, model.consulting_from_address.location_country));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_postal_code", SqlDbType.VarChar, 50, model.consulting_from_address.location_postal_code));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_latitude", SqlDbType.Float, 50, model.consulting_from_address.location_latitude));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_longitude", SqlDbType.Float, 50, model.consulting_from_address.location_longitude));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_floor_number", SqlDbType.VarChar, 20, model.consulting_from_address.location_floor_number));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_detail_address", SqlDbType.NVarChar, 255, model.consulting_from_address.location_detail_address));
    //paramArrayList.Add(dal.InitParameter("@PRM_delivery_state", SqlDbType.NVarChar, 255, model.consulting_from_address.location_state));

    @Data
    public static class LocationDetectionModel{

        private String location_address;
        private String location_country;
        private String location_postal_code;
        private BigDecimal location_latitude;
        private BigDecimal location_longitude;
        private String location_floor_number;
        private String location_detail_address;
        private String location_state;
        private String location_city;

    }


    @Data
    public static class SymptomPhotoVo{

        private String image_name;

        private String booking_image_id;
    }


    @Data
    public static class MedicationVo{

        private String MDMedication_ID;

        private String MDMedicationUsagePeriod_ID;

        private String amount_of_dosage;

    }


    @Data
    public static class AllergyVo{

        private String MDAllergies_ID;

        private String mem_allergies_index;
    }


    @Data
    public static class ReactionVo{

        private String MD_MedicationReaction_ID;

        private String mem_medication_reaction_index;

    }


    @Data
    public static class EmergencyContact{

        private String first_name;

        private String last_name;

        private String phone;

        private String relationship;
    }

}
